<template>
  <base-breadcrumb :title="$route.meta.title">
    <!--  分包结算 -->
    <a-form-model
      ref="ruleForm"
      :model="form"
      class="updateTotalPriceApproval"
      :label-col="{ span: 6 }"
      :wrapper-col="{ span: 18 }"
      :rules="editModel == 0 && noticeTypeDetail!=8 && noticeTypeDetail!=9 ? {} : rules"
    >
      <a-spin :spinning="loading">
        <!-- 表格 -->
        <a-card :bordered="false">
          <title-name title="基本信息"></title-name>
          <custom-form
            :formList="formList"
            :form="form"
            :is-emit="false"
            :editModel="editModel == 0 ? '' : ''"
            @select="selectOrg"
            @getProjectInfo="getProjectInfo"
          >
            <!-- 附件资料 -->
            <template #fileInfoList>
              <span
                class="fileList-tip"
                v-if="editModel == 2 || editModel ==3"
              >*</span>
              <template v-if="editModel != 0">
                <l-table
                  businessCode="FACE15"
                  :disabled="resolveInfo"
                  :uploadArrys.sync="form.fileInfoList"
                ></l-table>
              </template>
              <file-link
                v-else
                :fileList="form.fileInfoList"
                style="margin-top: -3px"
              ></file-link>
            </template>
          </custom-form>
        </a-card>
        <a-card
          :bordered="false"
          v-if="noticeTypeDetail || form.bomAuditedAmount"
        >
          <title-name title="分公司填报"></title-name>
          <custom-form
            :formList="formBranchList"
            :form="form"
            :is-emit="false"
            :editModel="editModel == 0 ? '' : ''"
          >
            <!-- 附件资料 -->
            <template #bomFileInfoList>
              <template v-if="noticeTypeDetail == 8">
                <l-table
                  businessCode="FACE15"
                  :disabled="resolveInfo"
                  :uploadArrys.sync="form.bomFileInfoList"
                ></l-table>
              </template>
              <file-link
                v-else
                :fileList="form.bomFileInfoList"
                style="margin-top: -3px"
              ></file-link>
            </template>
          </custom-form>
        </a-card>
        <a-card
          :bordered="false"
          v-if="noticeTypeDetail == 9 || form.comFinalAmount"
        >
          <title-name title="公司填报"></title-name>
          <custom-form
            :formList="formCompanyList"
            :form="form"
            :is-emit="false"
            :editModel="editModel == 0 ? '' : ''"
            @select="selectOrg"
          >
            <!-- 附件资料 -->
            <template #comFileInfoList>
              <template v-if="noticeTypeDetail == 9">
                <l-table
                  businessCode="FACE15"
                  :disabled="resolveInfo"
                  :uploadArrys.sync="form.comFileInfoList"
                ></l-table>
              </template>
              <file-link
                v-else
                :fileList="form.comFileInfoList"
                style="margin-top: -3px"
              ></file-link>
            </template>
            <template #decideFileInfoList>
              <template v-if="noticeTypeDetail == 9">
                <l-table
                  businessCode="FACE15"
                  :disabled="resolveInfo"
                  :uploadArrys.sync="form.decideFileInfoList"
                ></l-table>
              </template>
              <file-link
                v-else
                :fileList="form.decideFileInfoList"
                style="margin-top: -3px"
              ></file-link>
            </template>
          </custom-form>
        </a-card>
      </a-spin>
    </a-form-model>
     
    <!-- 页脚操作栏 -->
    <div
      class="btn_box page-btn-right-top"
      v-if="editModel != 0"
    >
      <a-button
        class="button_right"
        v-if="form.status == 'REJECTED' && !resolveInfo"
        type="primary"
        :loading="loadingBtn.REJECTED"
        @click="handleSubmit('REJECTED')"
      >保存</a-button>
        <a-button
         v-else
          v-show="this.editModel != 3 && !resolveInfo"
          class="button_right"
          type="primary"
          :loading="loadingBtn.DRAFT"
          @click="handleSubmit('DRAFT')"
        >保存草稿</a-button>
      <a-button
        class="button_right"
        type="primary"
        :loading="loadingBtn.SUBMITTED"
        @click="handleSubmit('SUBMITTED')"
      >提交</a-button>
      <a-button @click="handleActiveClose">关闭</a-button>
    </div>
    <!-- v-if="!isAudit && form.auditStatus*1 === 3" -->
    <div
      class="btn_box page-btn-right-top"
      v-else
    >
      <template v-if="noticeTypeDetail && !resolveInfo">
        <a-button
          class="button_right"
          type="primary"
          :loading="loadingBtn.SUBMITTED"
          @click="todoSubmit(noticeTypeDetail)"
        >提交</a-button>
      </template>
      <a-button @click="handleActiveClose">关闭</a-button>
    </div>
  </base-breadcrumb>
</template>

<script>
import { addSettlement, getSettlementById, editSettlement, getSettledAmount, addSettlementBomCommission, addSettlementComCommission, getSccByProjectIdForAppearanceDate } from '@/api/businessAffairs/settlement'
import { getSubcontractorsList } from '@/api/subcontractors/standing'
import subcontract from '@/api/legal/branchContract/subcontract'
import BaseEditPage from '@/views/baseEditPage' // 编辑详情页基础配置
import BSelect from '@/components/BComponents/BSelect'
import SelectSubCompany from '@/components/Select/SelectSubCompany' // 分公司
import SelectProject from '@/components/Select/SelectProject' // 分公司
// import SelectSubcontractor from '@/components/Select/SelectSubcontractor' // 分包商
import SelectSubcontractorCode from '@/components/Select/SelectSubcontractorCode'
import { category } from './model'
export default {
  name: 'a' + Date.now(),
  extends: new BaseEditPage(),
  components: {
    SelectProject,
    BSelect,
    SelectSubCompany,
    SelectSubcontractorCode
  },
  data() {
    return {
      loading: false, // 加载控件
      editModel: 0, // 操作状态:0 查看;1 编辑;2 新增;3填报
      form: { projectId: null, fileInfoList: [], bomFileInfoList: [], comFileInfoList: [], decideFileInfoList: [], contractAmount: null, settledAmount: null, exitTime: null, exitEndTime: null }, // 表单
      noticeTypeDetail: null,
      id: '',
      findCountQueryParam: {
        //获取合同名称
        pageNo: 1,
        pageSize: 10000,
        query: {}
      },
      subcontractorParm: {
        //获取分包商进出场台账
        pageNo: 1,
        pageSize: 10000,
        subcontractorName: '',
        branchId: '',
        projectName: ''
      },
      amountParm: {
        //获取已结算金额（含税）（万元）
        branchComId: null,
        contractId: null,
        projectId: null,
        subcontractorScc: null
      },
      loadingBtn: {
        DELETE: false,
        DRAFT: false,
        SUBMITTED: false,
        REJECTED: false,
        FILE: false
      },
      exitTimeArr: [],
      rules: {
        fileInfoList: [{ required: true, message: '请上传附件' }],
        projectFirstValue: [{ required: true, message: '请输入项目初审值(含税)(元)', trigger: 'blur' }],
        subcontractSubmittedValue: [{ required: true, message: '请输入分包报送值(含税)(元)', trigger: 'blur' }],
        subcontractorScc: [{ required: true, message: '请选择分包单位名称' }],
        type: [{ required: true, message: '请选择类别' }],
        contractId: [{ required: true, message: '请选择合同名称' }],
        bomAuditedAmount: [{ required: true, message: '请输入分公司审核金额(含税)(元)', trigger: 'blur' }],
        comFinalAmount: [{ required: true, message: '请输入公司终审金额(含税)(元)', trigger: 'blur' }],
        comCode: [{ required: true, message: '请输入终审编号', trigger: 'blur' }],
        exitTime: [{ required: true, message: '请选择分包退场时间', trigger: 'blur' }]
      }, // 校验规则
      init: false // 初始化控件
    }
  },
  watch: {
    'form.exitTime': {
      deep: true,
      handler: function (newV, oldV) {
        this.getExitEndTime(newV)
      }
    }
  },
  created() {},
  async mounted() {
    this.noticeTypeDetail = this.noticeType ? this.noticeType : null
    if (this.noticeTypeDetail) {
      this.$route.meta.title = '待办事项列表'
    } else {
      this.$route.meta.title = ['分包结算  查看', '分包结算 编辑', '分包结算 新增', '分包结算 填报'][this.editModel]
    }
    if (this.editModel != 2) {
      await this.getDetailData()
    } else {
      this.form.projectId = this.$userInfo().currentPost.projectId;
      this.$nextTick(() => {
        // 默认映射联系人为登陆人
        this.form.creatorName = this.$userInfo().name
        this.form.fillId = this.$userInfo().id
        this.form.modifiedTime = this.$dateFormat(new Date(), 'D')
        this.init = true
      })
    }
  },
  computed: {
    // 是否是业务待办查看处理信息
    resolveInfo: {
      get() {
        return this.$route.query?.resolveInfo === 'true'
      },
      set() {}
    },
    formList() {
      return [
        // {
        //   type: SelectSubCompany,
        //   keyName: 'branchComId',
        //   label: '所属分公司',
        //   placeholder: '自动带出',
        //   disabled: true,
        //   attrs: {
        //     isDefaultSelected: this.editModel == 2,
        //     autoSelected: this.editModel == 2
        //   }
        // },
        // {
        //   type: SelectProject,
        //   keyName: 'projectId',
        //   label: '所属项目',
        //   placeholder: '自动带出',
        //   disabled: true,
        //   attrs: {
        //     isDefaultSelected: this.editModel == 2,
        //     autoSelected: this.editModel == 2,
        //     keyValue: 'branchComId',
        //     isClear: this.editModel == 2,
        //     isEdit: this.editModel != 2,
        //     form: this.form
        //   },
        //   selectChange: (e) => {
        //     this.subcontractorParm.projectName = e?.name
        //   }
        // },
        {
          label: '所属单位',
          type: 'orgTree',
          keyName: 'projectId',
          rules: [{ required: true, message: '请选择项目名称', trigger: 'change' }],
          span: 16,
          isAutoSelectFirst: true,
          isNeedAuth:true ,
          checkStrictly: true,
          disabled: true,
          viewName: "viewName",
        },
        {
          keyName: 'subpackageUnitName',
          type: 'a-input',
          disabled: true,
          label: '分包单位名称',
          placeholder: '自动带出',
          hidden: this.editModel !== 0 && this.editModel !== 3
        },
        {
          type: SelectSubcontractorCode,
          keyName: 'subcontractorScc',
          label: '分包单位名称',
          disabled: this.editModel == 0 || this.editModel == 3,
          hidden: this.editModel == 0 || this.editModel == 3,
          attrs: {
            keyValue: 'projectId',
            isClear: this.editModel == 2,
            isEdit: this.editModel != 2,
            form: this.form
          },
          selectChange: (e) => {
            this.form.contractId = null
            this.form.contractAmount = null
            this.form.settledAmount = null
            this.form.exitTime = null
            this.form.exitEndTime = null
            this.$set(this.form, 'subpackageUnitName', e?.name)
            this.getSubcontractorsListFn(e?.name)
            this.getSccByProjectIdForAppearanceDateFn(e?.name)
          }
        },
        {
          keyName: 'contractName',
          type: 'a-input',
          disabled: true,
          label: '合同名称',
          placeholder: '自动带出',
          hidden: this.editModel !== 0
        },
        {
          keyName: 'contractId',
          type: BSelect,
          disabled: this.editModel == 0,
          label: '合同名称',
          placeholder: '请选择',
          hidden: this.editModel == 0,
          attrs: {
            form: this.form,
            keyValue: 'subpackageUnitName',
            request: this.getNameList
          },
          selectChange: (e) => {
            console.log(e, 'wanContractInTaxAmount')
            this.form.contractAmount = null
            this.form.settledAmount = null
            //切换名称获取数据
            let contractInTaxAmount = e?.contractInTaxAmount || '',
              wanContractInTaxAmount = contractInTaxAmount * 1 > 0 ? contractInTaxAmount / 10000 : ''
            this.$set(this.form, 'contractName', e?.contractName)
            this.$set(this.form, 'contractAmount', wanContractInTaxAmount)
            this.getSettledAmountFn(e?.id)
          }
        },
        {
          keyName: 'contractAmount',
          type: 'a-input-number',
          disabled: true,
          label: '合同额(含税)(万元)',
          placeholder: '自动带出',
          precision: 2
        },
        {
          keyName: 'type',
          type: 'a-select',
          disabled: this.editModel == 0,
          label: '类别',
          data: category,
          placeholder: '请选择',
          change: (e) => {
            let typeName = ''
            if (e * 1 === 0) {
              typeName = '分段结算'
            } else if (e * 1 === 1) {
              typeName = '最终结算'
            }
            this.$set(this.form, 'typeName', typeName)
          }
        },
        {
          keyName: 'settledAmount',
          type: 'a-input-number',
          disabled: true,
          label: '已结算金额(含税)(万元)',
          placeholder: '自动带出',
          precision: 2
        },
        {
          keyName: 'exitTime',
          type: 'a-input',
          disabled: this.exitTimeArr.length <= 1,
          label: '分包退场时间',
          placeholder: '自动带出',
          hidden: this.exitTimeArr.length > 1
        },
        {
          keyName: 'exitTime',
          type: 'a-select',
          label: '分包退场时间',
          data: this.exitTimeArr,
          disabled: this.exitTimeArr.length <= 1,
          hidden: this.exitTimeArr.length <= 1,
          placeholder: '请选择',
          change: (e) => {}
        },
        {
          keyName: 'exitEndTime',
          type: 'a-input',
          disabled: true,
          label: '分包结算应完成时间',
          placeholder: '自动带出'
        },
        {
          keyName: 'subcontractSubmittedValue',
          type: 'a-input-number',
          disabled: this.editModel == 0,
          label: '分包报送值(含税)(元)',
          placeholder: '请输入',
          precision: 2
        },
        {
          keyName: 'projectFirstValue',
          type: 'a-input-number',
          disabled: this.editModel == 0,
          label: '项目初审值(含税)(元)',
          placeholder: '请输入',
          precision: 2
        },
        {
          keyName: 'isExceed',
          type: 'a-input-number',
          disabled: true,
          hidden: this.editModel == 2,
          label: '是否超合同额10%',
          placeholder: '请输入',
          precision: 2
        },
        {
          keyName: 'creatorName',
          type: 'BaseInput',
          disabled: true,
          label: '填报人'
        },
        {
          keyName: 'modifiedTime',
          type: 'a-date-picker',
          placeholder: '请选择日期',
          disabled: true,
          label: '填报时间',
          attrs: {
            valueFormat: 'YYYY-MM-DD'
          }
        },
        {
          slot: true,
          keyName: 'fileInfoList',
          disabled: this.editModel == 0,
          label: '附件上传',
          span: 24
        }
      ].map((el) => {
        // 业务已办查看禁用表单(表单源列表需要深拷贝，每次重新定义则不需要)
        if (this.resolveInfo) el.disabled = true
        return el
      })
    },
    formBranchList() {
      return [
        {
          keyName: 'bomAuditedAmount',
          type: 'a-input-number',
          disabled: this.noticeTypeDetail != 8,
          label: '分公司审核金额(含税)(元)',
          placeholder: '请输入',
          precision: 2,
          change: (e) => {
            let bomReductionAmount = e * 1 - this.form.projectFirstValue * 1,
              bomReductionAmountRate = null
            bomReductionAmountRate = (bomReductionAmount / e) * 100
            this.$set(this.form, 'bomReductionAmount', bomReductionAmount)
            this.$set(this.form, 'bomReductionAmountRate', bomReductionAmountRate)
          }
        },
        {
          keyName: 'bomReductionAmount',
          type: 'a-input-number',
          disabled: true,
          label: '分公司审减额(元)',
          placeholder: '自动带出',
          precision: 2
        },
        {
          keyName: 'bomReductionAmountRate',
          type: 'a-input-number',
          disabled: true,
          label: '分公司审减率',
          placeholder: '自动带出',
          precision: 2
        },
        {
          keyName: 'branchManagerName',
          type: 'a-input',
          disabled: true,
          label: '分公司经办人',
          placeholder: '自动带出',
          hidden: this.noticeType == 8
        },
        {
          keyName: 'bomSubmitTime',
          type: 'a-input',
          disabled: true,
          label: '分公司审核完成时间',
          hidden: this.noticeType == 8,
          placeholder: '自动带出'
        },
        {
          slot: true,
          keyName: 'bomFileInfoList',
          disabled: this.noticeTypeDetail != 8,
          label: '项目补充资料',
          span: 24
        }
      ].map((el) => {
        // 业务已办查看禁用表单(表单源列表需要深拷贝，每次重新定义则不需要)
        if (this.resolveInfo) el.disabled = true
        return el
      })
    },
    formCompanyList() {
      return [
        {
          keyName: 'comFinalAmount',
          type: 'a-input-number',
          disabled: this.noticeTypeDetail != 9,
          label: '公司终审金额(含税)(元)',
          placeholder: '请输入',
          precision: 2,
          change: (e) => {
            let comReductionAmount = e * 1 - this.form.bomAuditedAmount * 1,
              comReductionAmountRate = null
            comReductionAmountRate = (comReductionAmount / e) * 100
            this.$set(this.form, 'comReductionAmount', comReductionAmount)
            this.$set(this.form, 'comReductionAmountRate', comReductionAmountRate)
          }
        },
        {
          keyName: 'comCode',
          type: 'a-input',
          disabled: this.noticeTypeDetail != 9,
          label: '终审编号',
          placeholder: '请输入',
          precision: 2
        },
        {
          keyName: 'comReductionAmount',
          type: 'a-input-number',
          disabled: true,
          label: '公司审减额(元)',
          placeholder: '自动带出',
          precision: 2
        },
        {
          keyName: 'comReductionAmountRate',
          type: 'a-input-number',
          disabled: true,
          label: '公司审减率',
          placeholder: '自动带出',
          precision: 2
        },
        {
          keyName: 'companyManagerName',
          type: 'a-input',
          disabled: true,
          label: '公司经办人',
          hidden: this.noticeType == 9,
          placeholder: '自动带出'
        },
        {
          keyName: 'comSubmitTime',
          type: 'a-input',
          disabled: true,
          label: '公司审核完成时间',
          hidden: this.noticeType == 9,
          placeholder: '自动带出'
        },
        {
          slot: true,
          keyName: 'comFileInfoList',
          disabled: this.noticeTypeDetail != 9,
          label: '项目补充资料',
          span: 24
        },
        {
          slot: true,
          keyName: 'decideFileInfoList',
          disabled: this.noticeTypeDetail != 9,
          label: '定案表',
          span: 24
        }
      ].map((el) => {
        // 业务已办查看禁用表单(表单源列表需要深拷贝，每次重新定义则不需要)
        if (this.resolveInfo) el.disabled = true
        return el
      })
    }
  },
  methods: {
    //选择单位
    selectOrg(val) {
        if (val && val.length) {
            this.form.branchComId = val[val.length - 2].orgId;
        }
        console.log('this.formthis.form',this.form)
    },
    //选择项目
    getProjectInfo(e){
      this.subcontractorParm.projectName = e?.name
    },
    async getSubcontractorsListFn(e) {},
    async getExitEndTime(data) {
      if (data) {
        let strExitTime = data.split('-'),
          exitEndTime = ''
        if (strExitTime[1] * 1 === 12) {
          exitEndTime = `${strExitTime[0] * 1 + 1}-01-${strExitTime[2]}`
        } else if (strExitTime[1] * 1 === 10 || strExitTime[1] * 1 === 11 || strExitTime[1] * 1 === 9) {
          exitEndTime = `${strExitTime[0]}-${strExitTime[1] * 1 + 1}-${strExitTime[2]}`
        } else {
          exitEndTime = `${strExitTime[0]}-0${strExitTime[1] * 1 + 1}-${strExitTime[2]}`
        }
        this.$set(this.form, 'exitEndTime', exitEndTime)
      }
    },
    //获取分包退场时间
    async getSccByProjectIdForAppearanceDateFn(e) {
      if (e) {
        let req = {
          subSupplyCompany: e,
          projectId: this.form.projectId
        }
        let { data } = await getSccByProjectIdForAppearanceDate(req)
        this.exitTimeArr = []
        if (data.length > 1) {
          data.map((item) => {
            if (item.endDate) {
              this.exitTimeArr.push({
                value: item.endDate,
                label: item.endDate
              })
            }
          })
        }
        if (data.length <= 1 || this.exitTimeArr.length == 1) {
          this.$set(this.form, 'exitTime', data[0]?.endDate)
        }
      }
    },
    async getSettledAmountFn(e) {
      let form = this.form
      if (e) {
        this.amountParm = {
          //获取已结算金额（含税）（万元）
          branchComId: form.branchComId,
          contractId: form.contractId,
          projectId: form.projectId,
          subpackageUnitName: this.subpackageUnitName
          // subcontractorScc:this.form.subcontractorScc?this.form.newSubcontractorScc:form.subcontractorScc
        }
        let data = await getSettledAmount(this.amountParm)
        if (data.code == '200') {
          this.$set(this.form, 'settledAmount', data?.data[0])
        }
      }
    },
    //获取分包商下面的合同
    async getNameList() {
      if (this.form.projectId && this.form.subpackageUnitName) {
        let req = {
          projectId: this.form.projectId,
          subSupplyCompany: this.form.subpackageUnitName
        }
        // this.findCountQueryParam.query.subSupplyCompany = this.form.subcontractorName
        return subcontract
          .getSubContractByScc(req)
          .then((res) => {
            if (res.data?.length > 0) {
              res.data.map((item) => {
                item.name = item.contractName
                item.id = item.contractId
              })
            }
            return { code: 200, data: res.data }
          })
          .catch(() => {
            return { code: 200, data: [] }
          })
      }
      return { code: 200, data: [] }
    },
    validateForm() {
      let flag = false
      this.$refs.ruleForm.validate((e) => {
        if (e) {
          flag = true
        }else {
          this.$message.warning('请填写完所有必填项信息')
        }
      })

      return flag
    },
    getDetailData() {
      // 不为添加时请求详情
      if (this.editModel != 2) {
        this.loading = true
        getSettlementById({ id: this.id })
          .then((res) => {
            this.loading = false
            res.data.projectId = res.data.projectId.toString()
            //res.data.type = res.data.type.toString();
            this.form = { ...this.form, ...res.data }
            this.form.contractId ?? delete this.form.contractId //返回null，要删除，不然必填项没有提示
            this.form.type ?? delete this.form.type

            if (this.editModel * 1 === 3 || this.editModel * 1 === 0) {
              this.form.newSubcontractorScc = this.form.subcontractorScc
              //  this.form.subcontractorScc = this.form.subpackageUnitName;
              if (!this.form.creatorName) {
                this.form.creatorName = this.$userInfo().name
              }
            }
            if (this.editModel * 1 === 1) {
              this.getSettledAmountFn(this.form.contractId)
            }
            this.$nextTick(() => {
              this.init = true
            })
          })
          .catch(() => {
            this.loading = false
          })
      } else {
        this.$nextTick(() => {
          this.init = true
        })
      }
    },
    /**
     * 提交表单
     */
    handleSubmit(status) {
      if (status == 'SUBMITTED' && !this.validateForm()) {
        return
      }
      let form = this.$clone(this.form)
      this.loading = true
      this.loadingBtn[status] = true
      console.log(this.form, ' this.form')
      if (this.editModel * 1 === 3) {
        this.form.subcontractorScc = this.form.newSubcontractorScc
        delete this.form.newSubcontractorScc
      }
      if (status != 'REJECTED') {
        form.status = status == 'SUBMITTED' ? 1 : 0
      } else {
        form.status = 5
      }
      let api = [editSettlement, addSettlement, editSettlement][this.editModel - 1]
      api(form)
        .then(() => {
          this.loading = false
          this.loadingBtn[status] = false
          this.$message.success(status == 'SUBMITTED' ? '提交成功！' : '保存成功')
          this.$multiTab.close()
        })
        .catch(() => {
          this.loadingBtn[status] = false
          this.loading = false
          this.$message.warning(err.data.message)
        })
    },
    //待办
    todoSubmit(num) {
      if (!num || !this.validateForm()) {
        return
      }
      let firstStr = this.form.subcontractorScc?.substr(0, 1)
      if (isNaN(firstStr)) {
        //如果subcontractorScc第一个字符是汉字，就不是id
        this.form.subcontractorScc = this.form.newSubcontractorScc
      }
      let form = this.$clone(this.form)
      this.loading = true
      this.loadingBtn['SUBMITTED'] = true
      let api = num * 1 === 8 ? addSettlementBomCommission : addSettlementComCommission
      api(form)
        .then(() => {
          this.loading = false
          this.loadingBtn['SUBMITTED'] = false
          this.$message.success('提交成功！')
          this.$multiTab.close()
        })
        .catch(() => {
          this.loadingBtn['SUBMITTED'] = false
          this.loading = false
          this.$message.warning(err.data.message)
        })
    }
  }
}
</script>
<style lang="less" scoped>
.fileList-tip {
  position: absolute;
  z-index: 1000;
  left: -81px;
  top: -3px;
  color: red;
}
</style>
